package com.lancoo.znbkxx.teacher.model.api

import com.lancoo.znbkxx.teacher.model.data.ZnbkResponse
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

/**
 * @author : Admin
 * @date   : 2019/7/11 9:59
 * @desc   :
 */
open class BaseRepository {
    suspend fun <T : Any> request(call: suspend () -> T): T {
        return withContext(Dispatchers.IO){ call.invoke()}
    }
}